package com.bupt.ilink.mapper.userManagement;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bupt.ilink.entity.userManagement.TeamSourceJurisdiction;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TeamSourceJurisdictionMapper extends BaseMapper<TeamSourceJurisdiction> {
    List<TeamSourceJurisdiction> selectByFileId(Long fileId);

    @Select("SELECT tsj.source_flow_id " +
            "FROM team_source_jurisdiction tsj " +
            "WHERE tsj.file_id = #{fileId} " +
            "AND tsj.source_type = #{sourceType}")
    List<String> selectSourceFlowIdByFileIdAndType(@Param("fileId") Long fileId, @Param("sourceType") String sourceType);

}
